1. Field of the Invention
The present invention relates to a method and system of audio synthesis and, more particularly, to a method and system of audio synthesis capable of reducing CPU load.
2. Description of Related Art
In current audio syntheses, a synthetic audio is generated by performing frequency modulation based on huge mathematical calculation by an audio synthesizer after communicating a lot of audio coefficients required by the synthesis with corresponding hardware, and output to a speaker for playing.
FIG. 1 is a block diagram of a typical audio synthesizer 80. The audio synthesizer 80 can be divided into three circuit-based sections: a modulation circuit 10 (FIG. 2), a controller 40, and an output circuit 50. The modulation circuit 10 can be implemented in many ways, for example, U.S. Pat. No. 4,813,326 granted to Hirano et al. for a “Method and apparatus for synthesizing music tones with high harmonic content”, as shown in FIG. 2, is provided to generate desired audio synthesis based on a predetermined modulation. The predetermined modulation can be frequency modulation (FM) or amplitude modulation (AM). An example is given in FM. For representing a modulating wave (assume that the timbre is piano) as an equation A(t)*SIN(ωct+I(t)*SIN ωmt), it only requires inputting modulation parameters to the modulation circuit 10. Thus, the timbre's wave is produced. Further, the modulation parameters includes modulating wave phase angle data ωmt, modulation wave data I(t), carrier phase angle data ωct, amplitude coefficient signal A(t) and tone color selection signal TC. Accordingly, the circuit 10 finally generates modulating wave shown in FIG. 3, which is the timbre of piano. However, the modulating wave is periodically repeated to present only a corresponding timbre. Different sounds of a timbre are generated only when the modulating wave is further input to the controller 40 to generate an audio wave.
FIG. 4 is a schematic diagram of control parameters for an exemplary ‘DO’ scale of FIG. 3. FIG. 5 shows an audio wave outputted by the controller 40 for the control parameters of FIG. 4. The control parameters include four kinds: attack, decay, sustain and release. The attack parameter amplifies the amplitude of the modulating wave. The decay parameter weakens the amplitude of the modulating wave. The sustain parameter nearly keeps on the amplitude of the modulating wave. The release parameter fades away the amplitude. When the controller 40 receives the modulating wave and applies the parameters to the modulating wave, as shown in FIG. 5, the audio wave of ‘DO’ scale for the timbre of piano is outputted.
The audio wave requires further generating left channel synthetic audio L and right channel synthetic audio R through the output circuit 50. The output circuit 50 receives the audio wave and modulates it based on characteristic parameters, to output the audio L and R. The characteristic parameters include mute parameter Mute, volume control parameter VoCol, channel control parameter ChCol, left selection parameter L-Col and right selection parameter R-Col. The parameter Mute determines whether or not each audio wave is outputted. The parameter VoCol adjusts current volume of an audio wave. The parameter ChCol determines if the audio wave is output. The parameters L-Col and R-Col control an output ratio of left to right channels of the audio wave. Finally, the left audio L and another left audio L′ generated by output circuits 50 of another channels are added, and similarly the right audio R and another right audio R′ are added, thus generating and outputting the synthetic audio.
FIG. 6 is a block diagram of a typical computer system performing audio synthesis. In the computer system, the cited modulation, control and characteristic parameters are outputted by a CPU 32 to an audio chip 30 (implemented on a sound card). The audio chip 30 has an internal audio synthesizer 80 for FM processing. The audio synthesized by the chip 30 is outputted to a speaker 34 for appropriate sound output. This is shown in a flowchart of FIG. 7. As shown in FIG. 7, modulation parameter, control parameter and property parameter are outputted from a CPU 32 to an audio chip 30 (step S70). In step S72, the audio chip 30 generates and outputs a synthetic audio based on the cited parameters. In step S74, the speaker 34 sounds based on the synthetic audio.
As cited, for audio synthesis, the CPU 32 requires transmitting the modulation parameter, the control parameter and the characteristic parameter to the audio chip 30. Thus, huge data transmission between the devices 32 and 30 is required, and the performance of the CPU 32 is reduced because the reading, calculating and outputting operations for parameters largely add the load of the CPU 32. Therefore, it is desirable to provide an improved method to mitigate and/or obviate the aforementioned problems.